<template>
  <div class="page-detail">
    <base-breadcrumb>
      <title-name
        title="物资目录信息"
        :size="24"
      />
      <a-card>
        <title-name title="目录信息" />
        <a-form-model
          ref="ruleForm"
          :model="formData"
        >
          <a-row>
            <a-col span="8">
              <a-form-model-item label="物资目录编码">
                <BaseInput
                  v-model="formData.mateClassCode"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item
                label="物资目录名称"
                prop="name"
              >
                <BaseInput
                  v-model="formData.mateClassName"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item
                label="上级目录名称"
                prop="parentName"
              >
                <BaseInput
                  v-model="formData.parenMateClassName"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="上级目录编码">
                <BaseInput
                  v-model="formData.parenMateClassCode"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="规格公式">
                <BaseInput
                  v-model="formData.Formula"
                  :max-length="500"
                  disabled
                />
              </a-form-model-item>
            </a-col>
            <a-col span="8">
              <a-form-model-item label="商品名称公式">
                <BaseInput
                  v-model="formData.ProductNameFormula"
                  :max-length="500"
                  disabled
                />
              </a-form-model-item>
            </a-col>

            <a-col span="8">
              <a-form-model-item label="状态">
                <BaseInput
                  v-model="formData.commonStatusStr"
                  disabled
                />
              </a-form-model-item>
            </a-col>
          </a-row>
        </a-form-model>
      </a-card>
      <a-card>
        <title-name title="规格属性" />
        <detail
          ref="detail"
          :row="formData.yunZhuMaterialCatalogPropertyBusVos"
        />
      </a-card>
      <div class="pub-header-btn page-btn-right-top">
        <a-button @click="$close">
          关闭
        </a-button>
      </div>
    </base-breadcrumb>
  </div>
</template>

<script>
import { findCatalogsById } from '@/api/material/goods/goods'
import detail from './components/detail/detail'
export default {
	name:'a'+Date.now(),
    components: {
        detail,
    },
    data() {
        return {
            loading: false,
            formData:this.$route.query.row
        }
    },
    mounted() {
        // this.getEditInfo()
    },
    methods: {
        // 获取编辑回显数据
        async getEditInfo() {
            this.loading = true
            let res = await findCatalogsById({ id: this.formData.id })
            if (res.code === 200) {
                this.formData = { ...this.formData, ...res.data }
                this.formData.isFrozenName = this.formData.isFrozenStr
            }
            this.loading = false
        }
    }
}
</script>

<style lang="less" scoped>
.masterPlanAdd {
    .rebarPlanTabel {
        background: #fff;
        padding: 20px;
        margin: 20px 0;
    }
}
</style>
